home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / amac40.zip / RFR006.QM < prev    next >
Text File  |  1991-08-03  |  16KB  |  409 lines

  1. *                               RFR006.QM
  2. *                        Written By Tom Hogshead
  3. *                       [ See RFRMxx.QM For Use ]
  4. *                             August 3, 1991
  5. *  Key       Subfile                       Description
  6. * =====  ==============  ====================================================
  7. * ^(F1__)              --Move Block, Fill Old Block With Blanks
  8. * ^(F2__)              --FillBlock With Blanks
  9. * ^(F9__)              --Make A COMMA Delimited File         |(Sammy Mitchell)
  10. * ^(F0__)              -"Break Apart" A COMMA Delimited File |
  11. * @(1)                 --Replace "Period Space" w/ "Period Two_spaces"-Para.
  12. * @(8)                 --Replace "Period Space" w/ "Period Space Space"
  13. *                           In Whole Paragragh (Variation of @1)
  14. * @(2)                 --Replace "Period Space" w/ "Period Two_spaces"-Doc.
  15. * @(3)                 --Copy Character At Cursor To Line Below
  16. * @(4)                 --Insert Space At Cursor And Move Down To Next Line
  17. * @(6)                 --   (Alternate to @4 Independent of Insert Status)
  18. * @(5)                 --Deletes The Char At The Cursor
  19. *                           And Move Down To Next Line
  20. * @(7)                 --Swap Characters At Cursor
  21. *
  22. *         {e:\up\RFRM*}--Return To RFRMxx.QM
  23. *
  24. *-- eoi
  25.  
  26. * 
  27. * ------------------------------------------------
  28. * ^(F1__) Block move, fills old block with blanks
  29. * ------------------------------------------------
  30. *
  31. * Mark block as column or character block, not a line block.  Move
  32. * cursor to location to move block to, press ^F1,  and block is moved to
  33. * new location.  Old block is filled with spaces.
  34. *
  35. * This macro is a slight modification to a macro written by Tim Farley
  36. * of SemWare (message #665/REGDOS conf).  I changed "Paste" to PastOver"
  37. * so all surrounding text position remains unchanged, and removed the test
  38. * if block was cut to end macro.  Tim's macro and comments are included
  39. * below this macro.
  40. *
  41. ^F1 MacroBegin
  42.         GotoBlockBeg                    * Get to block begin
  43.         JFalse END:                     * If no block, end macro
  44.         Cut                             *ELSE Cut block to scrap
  45.         Paste                           * And paste it back where it was
  46.         PrevPosition                    * Move where new block will be
  47.         FillBlock " " Return            * Fill old block with blanks
  48.         Pasteover                       * Paste old block to new loctn.
  49.  END:                                   *
  50. *
  51. * 16 bytes Thu  02-28-1991  15:14:17
  52.  
  53. * *  To: JOHN PHILLIPS                 Refer#: 665
  54. * *From: TIM FARLEY                      Read: NO
  55. * *Subj: Block_Move Problem?           Status: PUBLIC MESSAGE
  56. * *Conf: REGDOS 1                   Read Type: GENERAL (+)
  57. * *
  58. * *JP>*
  59. * *JP>* Block Cut and Move with blank fill
  60. * *JP>*
  61. * *
  62. * *Neat macro, thanks for posting it.  I'm sure there are others
  63. * *here who will take advantage of it.
  64. * *
  65. * *One thing:
  66. * *
  67. * *JP>                Store_Scrbuff 'Temp.$$$'
  68. * *JP>                Return
  69. * *JP>                Cut Paste
  70. * *JP>                FillBlock ' '
  71. * *JP>                Return
  72. * *
  73. * *I don't think the Cut/Paste sequence is actually necessary,
  74. * *unless the effect desired is to get a copy of the block into the
  75. * *scrap buffer for later use (after the macro is over) by Paste or
  76. * *PasteOver.
  77. * *
  78. * *If you really want it to work more like the "MoveBlock" command,
  79. * *you could make it simpler.  Because, with MoveBlock, you HAVE to
  80. * *have closed the block, and move the cursor to where you want it
  81. * *moved to.  Thus, you get rid of two things:  1) the need to test
  82. * *whether the block is marked, and close it if need be (not to
  83. * *mention the assumption that it is a column block); and 2) the
  84. * *need for the Pause command.
  85. * *
  86. * *Here it is:
  87. * *
  88. * @0   MacroBegin GotoBlockBeg      * Get to block
  89. *                 JFalse end:       * No move?  No block!
  90. *                 Cut               * Get into scrap
  91. *                 JFalse end:       * No cut?   No block!
  92. *                 Paste             * Put back, with marked
  93. *                 PrevPosition      * Back to where we were
  94. *                 FillBlock ' '     * Fill the original block
  95. *                 Return
  96. *                 Paste             * and put a copy at cursor.
  97. *            end:
  98. * * 19 bytes Thu  02-28-1991  15:30:52 (line added TH)
  99. *
  100. * *This macro (aside from being shorter & therefore faster) also
  101. * *quite nicely does nothing if the block is in the middle of being
  102. * *marked, or if there is no block marked.  It should work OK with
  103. * *line and character blocks too.
  104. * *
  105. * *Also:  you could modify this macro to do PasteOver instead of
  106. * *Paste at the end, which would make it paste the text "on top of"
  107. * *the pre-existing text.
  108. * *
  109. * *--Tim Farley
  110. * *  SemWare Technical Support
  111.  
  112. * =========================================================================
  113. * Date: 04-21-91 (21:24)           Number: 3786         SemWare Support BBS
  114. *   To: RON KULICK                 Refer#: NONE
  115. * From: KARL BRENDEL                 Read: YES
  116. * Subj: Shifted Text w/Block Move    Conf: (21) ILink
  117. * ------------------------------------------------------------------------
  118. * RK>When marking a block to be cut using the "Mark Column" command (ALT-K
  119. * RK>is there a way to keep the text at the right of the block from shifti
  120. * RK>left after the "Cut" command has been issued?     Thanks...
  121. *
  122. * If I understand what you're after, try:
  123. *
  124. * 
  125. * ------------------------------
  126. * ^(F2__) FillBlock With Blanks
  127. * ------------------------------
  128. * This is from the FillBlock documentation in the QEdit read.me file.
  129. *
  130. ^F2  MacroBegin GotoBlockBeg Cut Paste FillBlock ' ' Return
  131. *
  132. * 11 bytes Tue  04-23-1991  12:55:44 (line added TH)
  133.  
  134. * This may also be accomplished with:
  135. * ^F2  MacroBegin FillBlock ' ' Return
  136. * 8 bytes Mon  07-15-1991  11:25:31 (TH ^F2)
  137.  
  138.  
  139. * 
  140. * ---------------------------------------------------------------------
  141. * ^(F9__) Macro to make a comma delimited file from a file of the format:
  142. * ---------------------------------------------------------------------
  143. * Date: 10-10-90 (11:44)           Number: 10442        SemWare Support BBS
  144. *   To: ALL                        Refer#: NONE
  145. * From: SAMMY MITCHELL               Read: NO
  146. * Subj: MACROS                       Conf: (0) Main Board
  147. * ------------------------------------------------------------------------
  148. * We (SemWare) have been asked on many occasions how to change the CR/LF
  149. * characters at EOF to something else.  In most instances, the task that
  150. * the user wanted to accomplish could be done in another way.  For
  151. * example, we've had many requests to convert a mailing list file to a
  152. * comma delimited file for import into a database.  Here are some example
  153. * macros to make a comma delimited file, and convert a comma delimited
  154. * file back to its original format.  These macros will have to be
  155. * compiled with Qmac, as they are too large for Qconfig.  I do hope that
  156. * this helps someone!
  157. *
  158. *  (Key assignments changed TH    Wed  10-10-1990  )
  159. * record 1
  160. * record 2
  161. * record n
  162. *
  163. * Each group of name/address must be followed by at least one blank
  164. * line.
  165.  
  166. ^F9 MacroBegin
  167.         BegFile                         * Make sure at top
  168.   While1:
  169.         BegLine EndLine JTrue While2:   * Break out if non empty line
  170.         DelLine                         * Delete the blank line
  171.         CursorDown JFalse Macroexit:    * Exit macro if eof
  172.         CursorUp                        * Back up to the line to test
  173.         Jump While1:                    * Keep looping while blank
  174. * nonblank line found - see if next line is nonblank also
  175.   While2:
  176.         CursorDown JFalse Macroexit:    * exit macro if eof
  177.         BegLine EndLine JFalse While1:  * if blank line, start over
  178.         CursorUp EndLine "," JoinLine   * join the next line
  179.         Jump While2:                    * and keep on until blank
  180.   Macroexit:
  181.         BegFile                         * show user bof
  182. *
  183. * 37 bytes Wed  10-10-1990  22:16:45 (line added TH)
  184.  
  185. * 
  186. * ---------------------------------------------------------------------
  187. * ^(F0__) Macro to "break apart" a comma delimited file, as created from
  188. *         the ^F9  macro above.
  189. * ---------------------------------------------------------------------
  190.  
  191. ^f10 MacroBegin
  192.         BegFile                         * Start at bof
  193.   find_first_comma:
  194.         Find "," Return "" Return       * Find first comma
  195.         jFalse macroexit:               * Exit if none
  196.   makeline:
  197.         UnMarkBlock
  198.         DelCh                           * Delete the ','
  199.         SplitLine                       * Split the line
  200.         CursorDown                      * Next line
  201.         BegLine                         * Column 1
  202. * remove leading blanks
  203.   delete_blanks:
  204.         UnMarkBlock
  205.         DropAnchor
  206.         Find " " Return "GL" Return     * Blank found?
  207.         jFalse continue                 * No, continue
  208.         DelCh                           * Delete it
  209.         jump delete_blanks:             * And try again
  210.   continue:
  211.         UnMarkBlock
  212.         MarkLine                        * Look for next  ,' on line
  213.         Find "," Return "L" Return      *
  214.         jTrue makeline:                 * Split if found
  215.         UnMarkBlock
  216.         AddLine                         * Otherwise, add a blank line
  217.         jump find_first_comma:          * And look for another ','
  218.   macroexit:
  219.         BegFile                         * Show user bof
  220. *
  221. * 54 bytes Wed  10-10-1990  22:17:04 (line added TH)
  222. *
  223. * That's all, folks!
  224.  
  225. * 
  226. * ┌───────────────────────────────────────────────────────────────────┐
  227. * │@(1) Replace "period space" w/ "period space space" - PARAGRAPH    │
  228. * └───────────────────────────────────────────────────────────────────┘
  229. * This macro was written by Tim Farley of SemWare.
  230. *
  231. * =========================================================================
  232. * Date: 01-18-91 (13:59)           Number: 3433         SemWare Support BBS
  233. *   To: BOB LONG                   Refer#: 3430
  234. * From: TIM FARLEY                   Read: YES
  235. * Subj: Legibility breaks            Conf: (21) ILink
  236. * ------------------------------------------------------------------------
  237. * BL>It had to do with retaining double spaces between sentences
  238. * BL>even when they fall at the ends of lines and then get moved when the
  239. * BL>paragraph is reformed.  I reinstalled 2.1, choosing the option to
  240. * BL>retain trailing blanks, but QEdit still removes one blank.
  241. * BL>
  242. * BL>Is there a workaround?
  243. *
  244. * The only workaround I know for that one would be to encase
  245. * WrapPara in a macro, that would mark the entire paragraph as a
  246. * block, and do a global search and replace (limited to the block)
  247. * to change ".  " to ".  " to put the spaces back in.  Kludgy, and
  248. * not perfect, but perhaps workable.
  249. *
  250. * Here's what it would look like:
  251. *
  252. * *
  253. * * WrapPara modification:  retains double spacing after "." chars.
  254. * *
  255. @1      MacroBegin UnmarkBlock      * we're going to be using blocks
  256.         MarkCharacter WrapPara      * Wrap paragraph & mark rest of it
  257.         MarkCharacter GotoBlockBeg  * Close mark & go to begin of it
  258.         FindReplace ". " Return     * Change period with single space
  259.         ".  " Return "LN" Return    * to one with double space.
  260.         JFalse end:                 * None?  We're done...
  261.         FindReplace ".   " Return   * Now fix any that ended up with 3
  262.         ".  " Return "LN" Return    * to have just two again.
  263.      end:
  264.         GotoBlockEnd UnmarkBlock
  265. *
  266. * 54 bytes Fri  01-18-1991  21:23:45 (line added TH January 18, 1991)
  267. * 54 bytes Wed  07-31-1991  10:40:13 (TH @1, corrected)
  268.  
  269. *
  270. * As usual, remove the comments to the right, and reformat this all on one
  271. * line if you plan to put it in QCONFIG.DAT.
  272. *
  273. * --Tim Farley
  274.  
  275. * 
  276. * ----------------------------------------------------------------------
  277. * @(8) Replace "period space" w/ "period space space" in whole paragragh
  278. * ----------------------------------------------------------------------
  279.  
  280. * This macro is a variation of Tim Farley's @1 above, that replaces
  281. * a 'period space' with a 'period two spaces' in the whole
  282. * paragragh the cursor is positioned in and positions the cursor at
  283. * the start of the next paragragh.
  284.  
  285. @8      MacroBegin
  286.         Cursordown                  * move down one line                  |
  287.         Prevpara                    * get to beginning of paragraph       |
  288.         UnmarkBlock                 * we're going to be using blocks
  289.         MarkCharacter WrapPara      * Wrap paragraph & mark it
  290.         MarkCharacter GotoBlockBeg  * Close mark & go to begin of it
  291.         FindReplace ". " Return     * Change period with single space
  292.         ".  " Return "LN" Return    * to one with double space.
  293.         JFalse end:                 * None?  We're done...
  294.         FindReplace ".   " Return   * Now fix any that ended up with 3
  295.         ".  " Return "LN" Return    * to have just two again.
  296.      end:
  297.         Nextpara                    * go to begin next paragraph          |
  298.         UnmarkBlock
  299. *
  300. * 56 bytes Wed  07-31-1991  10:56:27 (TH @8)
  301.  
  302. * 
  303. * ┌──────────────────────────────────────────────────────────────────┐
  304. * │@(2) Replace "period space" w/ "period space space" - DOCUMENT    │
  305. * └──────────────────────────────────────────────────────────────────┘
  306. *
  307. *  Change "GN" to "G" for replacement with confirmation.
  308. *
  309. @2      MacroBegin
  310.         FindReplace ".  " Return ".  " Return "GN" Return
  311.         FindReplace ".  " Return       Return "GN" Return
  312. *
  313. * 38 bytes Wed  02-20-1991  01:09:09
  314.  
  315.  
  316. * 
  317. * ----------------------------------------------------------------------
  318. * @(3) Copy Character At Cursor To Line Below
  319. * ----------------------------------------------------------------------
  320.  
  321. @3  macrobegin
  322.     cursordown
  323.     getprev
  324.     cursorleft
  325. *
  326. * 7 bytes Sun  07-28-1991  16:45:37 (TH @3)
  327.  
  328. * 
  329. * ----------------------------------------------------------------------
  330. * @(4) Insert Space At Cursor And Move Down To Next Line
  331. * ----------------------------------------------------------------------
  332. * Insert must be ON
  333.  
  334. @4  macrobegin
  335.     " "
  336.     cursorleft
  337.     cursordown
  338. *
  339. * 8 bytes Wed  09-05-1990  16:14:32
  340.  
  341. * 
  342. * ----------------------------------------------------------------------
  343. * @(6) Insert Space At Cursor And Move Down To Next Line
  344. * ----------------------------------------------------------------------
  345.  
  346. * The following @(6) alternate approach is independent of Insert status:
  347.  
  348. @6  macrobegin
  349.     splitline
  350.     cursorright
  351.     joinline
  352.     cursordown
  353.     cursorleft
  354. *
  355. * 9 bytes Mon  07-29-1991  14:10:35 (TH @6)
  356.  
  357.  
  358. * 
  359. * ----------------------------------------------------------------------
  360. * @(5) Deletes The Char At The Cursor And Move Down To Next Line
  361. * ----------------------------------------------------------------------
  362. * Source unknown.
  363.  
  364. @5  macrobegin
  365.     delch
  366.     cursordown
  367. *
  368. * 6 bytes Tue  09-11-1990  09:40:22
  369.  
  370.  
  371. * 
  372. * ----------------------------------------------------------------------
  373. * @(7) Swap Characters At Cursor
  374. * ----------------------------------------------------------------------
  375.  
  376. * This macro swaps the character at the cursor with the following
  377. * character and positions the cursor on the first character following
  378. * the swapped characters.  If one of the characters to be swapped is a
  379. * space, wierd things happen -- swap only visible characters.  The
  380. * macro is independent of all toggle status's and does not effect
  381. * block status.  An earlier macro I can't find, swapped characters
  382. * using marked column blocks, which obviously clears blocks.
  383.  
  384. *123456 test
  385.  
  386. @7      MacroBegin
  387.         CursorRight
  388.         CursorRight
  389.         SplitLine
  390.         SplitLine
  391.         CursorDown
  392.         CursorLeft
  393.         GetPrev
  394.         CursorLeft
  395.         Backspace
  396.         Backspace
  397.         CursorRight
  398.         GetPrev
  399.         CursorUp
  400.         DelCh
  401.         Backspace
  402.         JoinLine
  403.         DelRtWord
  404.         EndLine
  405.         JoinLine
  406. *
  407. * 23 bytes Tue  07-30-1991  11:37:41 (TH @7)
  408.  
  409.